<div class="titlebar"><i class="iconfont icon-wodeqiangdan"></i> 活动套装</div>
<form id="form" action="{:url('popupshop/sale/edit')}">
    <input type="hidden" name="id" value="{$info.id}"/>
    <input type="hidden" name="store_id" value="{$info.store_id}"/>
    <input type="hidden" name="user_id" value="{$info.user_id}"/>
    <input type="hidden" name="is_sale" value="{$info.is_sale}"/>
    <table class="formtable" id="gift">
        <tr>
            <th></th>
            <td class="input-group">
                <input readonly value="产品ID" class="input fn-tac readonly disabled" type="text" />
                <input readonly value="成本价" class="input fn-tac readonly disabled" type="text" />
                <input readonly value="委托价" class="input fn-tac readonly disabled" type="text" />
                <input readonly value="销售价" class="input fn-tac readonly disabled" type="text" />
            </td>
        </tr>
        <tr><th>销售产品:</th><td class="input-group">
            <input autocomplete="off" readonly id="item_id" class="win readonly input" datatype="n" type="text" name="house_id" value="{$info.house_id}"/>
            <input autocomplete="off" id="cost_price" class="input" type="text" name="cost_price"  value="{$info.user_cost_price}"/>
            <input autocomplete="off" id="entrust_price" class="input" type="text" name="entrust_price" value="{$info.user_entrust_price}"/>
            <input autocomplete="off" id="sale_price" class="input" datatype="*" type="text" name="sale_price"  value="{$info.user_sale_price}"/>
        </td></tr>
        {if count($info.gift) <= 0}
        <tr class="gift"><th>赠送产品:</th><td class="input-group">
            <input autocomplete="off" id="0" readonly class="win readonly input gift_house_id_0" datatype="n" type="text" name="gift[house_id][]" />
            <input autocomplete="off" id="gift_cost_price_0" class="input" datatype="npot" type="text" name="gift[cost_price][]" />
            <input autocomplete="off" class="input" datatype="npot" type="text" name="gift[entrust_price][]" />
            <input autocomplete="off" class="input" datatype="npot" type="text" name="gift[sale_price][]" />
            <div class="fn-left w50 fn-tac fn-cp" id="add"><i class="iconfont icon-add_icon"></i></div>
        </td></tr>
        {else}
        {foreach $info.gift as $key => $vo}
        <tr>
            <th>{if !$key}赠送产品:{/if}</th>
            <td class="input-group">
                <input autocomplete="off" id="{$key}" readonly class="win readonly input gift_item_id_{$key}" datatype="n" type="text" name="gift[house_id][]" value="{$vo.house_id}"/>
                <input autocomplete="off" id="gift_cost_price_{$key}" class="input" datatype="npot" type="text" name="gift[cost_price][]"  value="{$vo.cost_price}"/>
                <input autocomplete="off" class="input" datatype="npot" type="text" name="gift[entrust_price][]"  value="{$vo.entrust_price}"/>
                <input autocomplete="off" class="input" datatype="npot" type="text" name="gift[sale_price][]"  value="{$vo.sale_price}"/>
            {if $key}
                <div class="fn-left w50 fn-tac fn-cp" onClick="delGift(this)"><i class="iconfont icon-reduce_icon"></i></div>
            {else}
                <div class="fn-left w50 fn-tac fn-cp" id="add"><i class="iconfont icon-add_icon"></i></div>
            {/if}
            </td>
        </tr>
        {/foreach}
        {/if}
    </table>
    <table class="formtable">
        <tr><th></th><td>
            <input type="submit" value="确定" class="button button-blue submit" />
            <input type="reset" value="重置" class="button button-blank" />
        </td></tr>
    </table>
</form>
{include file="sale:js" /}